PANEL.Base = "DPanel"

function PANEL:Init()
	self:SetVisible( false )
	
	self.dAuthor = vgui.Create("DLabel", self)
	self.dAuthor:SetTextColor( Color(255,255,255,255) )
	self.dAuthor:SetFont("ScoreboardText")
	
	self.dTweet = vgui.Create("DLabel", self)
	self.dTweet:SetWrap(true)
	self.dTweet:SetTextColor( Color(255,255,255,255) )
	self.dTweet:SetFont("DefaultSmall")
end

function PANEL:SetTweet( sTweet )
	self.m_Tweet = sTweet
	self.dTweet:SetText( tostring(self.m_Tweet) )
end

function PANEL:SetAuthor( sAuthor )
	self.m_Author = sAuthor
	self.dAuthor:SetText( tostring(self.m_Author) )
end

function PANEL:PerformLayout()

	self.dAuthor:SetWide( self:GetWide() - 32 )
	self.dAuthor:SetTall( 16 )
	self.dAuthor:AlignLeft( 16 )
	self.dAuthor:AlignTop( 0 )

	self.dTweet:SetWide( self:GetWide() - 8 )
	self.dTweet:SetTall( self:GetTall() - 14 )
	self.dTweet:CenterHorizontal()
	self.dTweet:AlignBottom( 2 )
	
end

function PANEL:Paint()
	surface.SetDrawColor(0,0,0,128)
	surface.DrawRect(0,0, self:GetWide(), self:GetTall())
	
	return true
end
